package com.JobFind.logic.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.JobFind.logic.ILogLogic;
import com.JobFind.model.TbLog;
import com.JobFind.DAO.ILogDAO;

@Component
public class LogLogic implements ILogLogic{
	private ILogDAO  logDAO;
	
	public ILogDAO getLogDAO() {
		return logDAO;
	}

	@Resource
	public void setLogDAO(ILogDAO logDAO) {
		this.logDAO = logDAO;
	}

	@Transactional
	public Integer addLog(TbLog logBean) throws Exception{
		Integer result = 0;
		try {
			result = this.logDAO.addLog(logBean);
		} catch (Exception e) {
			e.printStackTrace();
			result = 0;
		}
		return result;
	}
}
